<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="always" name="referrer">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>个人信息</title>
    <link rel="stylesheet" href="/LianniuWeb/css/new/reset.css">
    <link rel="stylesheet" href="/LianniuWeb/css/new/personal_information.css">
    <link type="text/css" rel="stylesheet" href="/LianniuWeb/css/easydialog.css"/>
    <script type="text/javascript" src="/LianniuWeb/js/widget/easydialog.min.js"></script>
</head>
<body>
<div class="photo_top" id="filePicker">
    <div class="photo_box"></div>
</div>
<div id="upload" style="display: none;"></div>
<div class="personal_box" onclick="javascript:infomationDetail();">
    <span class="person1">个人信息</span>
    <p></p>
</div>
<div class="personal_box" onclick="window.location.href='/LianniuWeb/buyer/favorite/favorites.do'">
    <span class="collection1">收藏夹</span>
    <p></p>
</div>
<div class="personal_box" onclick="window.location.href='/LianniuWeb/help.do?id=14'">
    <span class="help1">帮助中心</span>
    <p></p>
</div>
<div class="personal_box" onclick="window.location.href='tel:4008637797'">
    <span class="phone1" >客服电话 400-8637-797</span>
    <p></p>
</div>
<div class="personal_box" onclick="window.location.href='/LianniuWeb/help.do?id=13'">
    <span class="about1">关于</span>
    <p></p>
</div>
<div class="detail_bottom">
    <div class="index2" onclick="location.href='/LianniuWeb/buyer/product/index.do'">
        <p></p>
        <span>首页</span>
    </div>
    <div class="market_gray" onclick="location.href='/LianniuWeb/buyer/product/trend.do'">
        <p></p>
        <span>行情</span>
    </div>
    <div class="order_gray" onclick="location.href='/LianniuWeb/buyerOrder/orders.do'">
        <p></p>
        <span>订单</span>
    </div>
    <div class="my_gray" onclick="location.href='/LianniuWeb/buyerOrder/mine.do'">
        <p></p>
        <span  class="color_green">我的</span>
    </div>
</div>
<script src="/LianniuWeb/js/underscore/underscore.js"></script>
<script src="/LianniuWeb/js/commons/commons.js"></script>
<script src="/LianniuWeb/js/commons/util.js"></script>
<script src="/LianniuWeb/js/jquery/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="/LianniuWeb/js/buyer/flexible.js"></script>
<script type="text/javascript" src="/LianniuWeb/js/buyer/buyer_mine.js"></script>
<link rel="stylesheet" href="/LianniuWeb/css/new//webuploader.css" />
<script src="/LianniuWeb/js/buyer/webuploader.js"></script>
<script type="text/javascript">
    $("#filePicker").click(function(){
        $("#upload").find("input[type=file]").click();
    })
    // 初始化Web Uploader
    var uploader = WebUploader.create({

        // 选完文件后，是否自动上传。
        auto: true,
        // swf文件路径
        swf: '/js/Uploader.swf',

        // 文件接收服务端。
        server: '/LianniuWeb/rest/fileUpload/uploadPic.do?filepath=auth',

        // 选择文件的按钮。可选。
        // 内部根据当前运行是创建，可能是input元素，也可能是flash.
        pick: {id:'#upload',multiple:false},
        compress:{
            width: 500,
            height: 600,

            // 图片质量，只有type为`image/jpeg`的时候才有效。
            quality: 40,

            // 是否允许放大，如果想要生成小图的时候不失真，此选项应该设置为false.
            allowMagnify: false,

            // 是否允许裁剪。
            crop: false,

            // 如果发现压缩后文件大小比原来还大，则使用原来图片
            // 此属性可能会影响图片自动纠正功能
            noCompressIfLarger: false,

            // 单位字节，如果图片大小小于此值，不会采用压缩。
            compressSize: 30 * 1024
        },
        // 只允许选择图片文件。
        accept: {
            title: 'Images',
            extensions: 'gif,jpg,jpeg,bmp,png',
            mimeTypes: 'image/*'
        }
    });
    uploader.on( 'uploadSuccess', function( file,a,b ) {
        $.ajax({
            url:server_url + '/rest/frontUser/updatePic.do',
            type:'post',
            data:{userId:userid,identyCardPath: a.data},
            success:function(){
                $(".photo_box").css("background","#d6ffeb url("+a.data+") no-repeat center");
                $(".photo_box").css("background-size","cover");

            }
        })
    });

    uploader.on( 'uploadError', function( file ) {
        easyAlert("上传出错");
    });
</script>
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?867c800f411683d2a7fa9eb1eabd9736";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
</body>
</html>